# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Ner0 <darkelfdarkelf666@yahoo.co.uk>
# Contributor: dserban <dserban01@yahoo.com>

pkgname=switchboard
pkgver=6.0.2
pkgrel=1
pkgdesc='The Pantheon Control Center'
arch=(loong64 x86_64)
url=https://github.com/elementary/switchboard
license=(GPL3)
groups=(pantheon)
depends=(
  clutter-gtk
  gdk-pixbuf2
  glib2
  gtk3
  libgee
  libgranite.so
  libhandy-1.so
  wayland
)
makedepends=(
  git
  meson
  intltool
  vala
)
optdepends=(
  'switchboard-plug-about: About plug'
  'switchboard-plug-applications: Applications plug'
  'switchboard-plug-datetime: Date & Time plug'
  'switchboard-plug-desktop: Desktop plug'
  'switchboard-plug-display: Display plug'
  'switchboard-plug-elementary-tweaks: Elementary Tweaks plug'
  'switchboard-plug-keyboard: Keyboard plug'
  'switchboard-plug-locale: Locale plug'
  'switchboard-plug-network: Network plug'
  'switchboard-plug-notifications: Notifications plug'
  'switchboard-plug-power: Power plug'
  'switchboard-plug-security-privacy: Security & Privacy plug'
)
provides=(libswitchboard-2.0.so)
_tag=a38cb4fe0dafb35b57ad58aa45c81aa33b7bb34b
source=(git+https://github.com/elementary/switchboard.git#tag=${_tag})
b2sums=(SKIP)

prepare() {
  cd switchboard
  git cherry-pick -n ecf2a6c42122946cc84150f6927ef69c1f67c909
}

pkgver() {
  cd switchboard
  git describe --tags
}

build() {
  arch-meson switchboard build
  ninja -C build
}

package() {
  DESTDIR="${pkgdir}" meson install -C build
}

# vim: ts=2 sw=2 et:
